Before you export your data from Google to RStudio, make sure your spreadsheet follows these four guidelines:
If you have formatted your data correctly, then it can be read as .csv form, which is how R reads your data. Download your properly-formatted spreadsheet as a .csv file by selecting File > Download as > Comma-separated values (.csv). The file will download to your local hard-drive.
Next, open your RStudio browser. In the Files/Plots/Packages/Help pane, upload your data by selecting Files > Upload > Choose File > your_spreadsheet_name.csv. Then, select Open, which uploads your data to RStudio. You will find the name of your data in your list of Files.
To access this data, you will first have to give it a one-word name (let's call this example_data). In the R console, type: example_data = read.csv(“The name of your data frame.csv”). read.csv() is a function that takes a file name as an argument and reads it into the RStudio console under the given name on the left-hand side of the equals sign. The data is now stored in the console as \( \text{example_data} \).
To confirm you loaded the data correctly, try the follow command: \( \text{View(example_data)} \) If the data were loaded correctly, the data frame will open in the source pane.